\(\int \frac {(d+e x)^3 (a+b \log (c x^n))}{x^4} \, dx\) [26]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 126 \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {b d^3 n}{9 x^3}-\frac {3 b d^2 e n}{4 x^2}-\frac {3 b d e^2 n}{x}-\frac {1}{2} b e^3 n \log ^2(x)-\frac {d^3 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {3 d^2 e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {3 d e^2 \left (a+b \log \left (c x^n\right )\right )}{x}+e^3 \log (x) \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-1/9*b*d^3*n/x^3-3/4*b*d^2*e*n/x^2-3*b*d*e^2*n/x-1/2*b*e^3*n*ln(x)^2-1/3*d^3*(a+b*ln(c*x^n))/x^3-3/2*d^2*e*(a+
b*ln(c*x^n))/x^2-3*d*e^2*(a+b*ln(c*x^n))/x+e^3*ln(x)*(a+b*ln(c*x^n))

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {45, 2372, 14, 2338} \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {d^3 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {3 d^2 e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {3 d e^2 \left (a+b \log \left (c x^n\right )\right )}{x}+e^3 \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {b d^3 n}{9 x^3}-\frac {3 b d^2 e n}{4 x^2}-\frac {3 b d e^2 n}{x}-\frac {1}{2} b e^3 n \log ^2(x) \]

[In]

Int[((d + e*x)^3*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-1/9*(b*d^3*n)/x^3 - (3*b*d^2*e*n)/(4*x^2) - (3*b*d*e^2*n)/x - (b*e^3*n*Log[x]^2)/2 - (d^3*(a + b*Log[c*x^n]))
/(3*x^3) - (3*d^2*e*(a + b*Log[c*x^n]))/(2*x^2) - (3*d*e^2*(a + b*Log[c*x^n]))/x + e^3*Log[x]*(a + b*Log[c*x^n
])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = -\frac {d^3 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {3 d^2 e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {3 d e^2 \left (a+b \log \left (c x^n\right )\right )}{x}+e^3 \log (x) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (-\frac {d \left (2 d^2+9 d e x+18 e^2 x^2\right )}{6 x^4}+\frac {e^3 \log (x)}{x}\right ) \, dx \\ & = -\frac {d^3 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {3 d^2 e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {3 d e^2 \left (a+b \log \left (c x^n\right )\right )}{x}+e^3 \log (x) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{6} (b d n) \int \frac {2 d^2+9 d e x+18 e^2 x^2}{x^4} \, dx-\left (b e^3 n\right ) \int \frac {\log (x)}{x} \, dx \\ & = -\frac {1}{2} b e^3 n \log ^2(x)-\frac {d^3 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {3 d^2 e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {3 d e^2 \left (a+b \log \left (c x^n\right )\right )}{x}+e^3 \log (x) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{6} (b d n) \int \left (\frac {2 d^2}{x^4}+\frac {9 d e}{x^3}+\frac {18 e^2}{x^2}\right ) \, dx \\ & = -\frac {b d^3 n}{9 x^3}-\frac {3 b d^2 e n}{4 x^2}-\frac {3 b d e^2 n}{x}-\frac {1}{2} b e^3 n \log ^2(x)-\frac {d^3 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {3 d^2 e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {3 d e^2 \left (a+b \log \left (c x^n\right )\right )}{x}+e^3 \log (x) \left (a+b \log \left (c x^n\right )\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.97 \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {b d^3 n}{9 x^3}-\frac {3 b d^2 e n}{4 x^2}-\frac {3 b d e^2 n}{x}-\frac {d^3 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {3 d^2 e \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {3 d e^2 \left (a+b \log \left (c x^n\right )\right )}{x}+\frac {e^3 \left (a+b \log \left (c x^n\right )\right )^2}{2 b n} \]

[In]

Integrate[((d + e*x)^3*(a + b*Log[c*x^n]))/x^4,x]

[Out]

-1/9*(b*d^3*n)/x^3 - (3*b*d^2*e*n)/(4*x^2) - (3*b*d*e^2*n)/x - (d^3*(a + b*Log[c*x^n]))/(3*x^3) - (3*d^2*e*(a
+ b*Log[c*x^n]))/(2*x^2) - (3*d*e^2*(a + b*Log[c*x^n]))/x + (e^3*(a + b*Log[c*x^n])^2)/(2*b*n)

Maple [A] (verified)

Time = 0.50 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.14

method result size
parallelrisch \(\frac {36 \ln \left (x \right ) x^{3} a \,e^{3} n +18 e^{3} b \ln \left (c \,x^{n}\right )^{2} x^{3}-108 x^{2} \ln \left (c \,x^{n}\right ) b d \,e^{2} n -108 x^{2} b d \,e^{2} n^{2}-108 x^{2} a d \,e^{2} n -54 x \ln \left (c \,x^{n}\right ) b \,d^{2} e n -27 x b \,d^{2} e \,n^{2}-54 x a \,d^{2} e n -12 \ln \left (c \,x^{n}\right ) b \,d^{3} n -4 b \,d^{3} n^{2}-12 a \,d^{3} n}{36 x^{3} n}\) \(144\)
risch \(-\frac {b \left (-6 e^{3} \ln \left (x \right ) x^{3}+18 d \,e^{2} x^{2}+9 d^{2} e x +2 d^{3}\right ) \ln \left (x^{n}\right )}{6 x^{3}}-\frac {-54 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-27 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) e x +54 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+54 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+27 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} e x +27 i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} e x -6 i \pi b \,d^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+12 a \,d^{3}-36 \ln \left (x \right ) a \,e^{3} x^{3}+12 d^{3} b \ln \left (c \right )-18 i \ln \left (x \right ) \pi b \,e^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{3}-18 i \ln \left (x \right ) \pi b \,e^{3} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} x^{3}-27 i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3} e x -54 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+4 b \,d^{3} n -6 i \pi b \,d^{3} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+18 i \ln \left (x \right ) \pi b \,e^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) x^{3}+108 a d \,e^{2} x^{2}+54 a \,d^{2} e x +18 i \ln \left (x \right ) \pi b \,e^{3} \operatorname {csgn}\left (i c \,x^{n}\right )^{3} x^{3}+108 \ln \left (c \right ) b d \,e^{2} x^{2}+54 \ln \left (c \right ) b \,d^{2} e x -36 \ln \left (x \right ) \ln \left (c \right ) b \,e^{3} x^{3}+18 e^{3} b n \ln \left (x \right )^{2} x^{3}+27 b \,d^{2} e n x +108 b d \,e^{2} n \,x^{2}+6 i \pi b \,d^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+6 i \pi b \,d^{3} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{36 x^{3}}\) \(589\)

[In]

int((e*x+d)^3*(a+b*ln(c*x^n))/x^4,x,method=_RETURNVERBOSE)

[Out]

1/36/x^3*(36*ln(x)*x^3*a*e^3*n+18*e^3*b*ln(c*x^n)^2*x^3-108*x^2*ln(c*x^n)*b*d*e^2*n-108*x^2*b*d*e^2*n^2-108*x^
2*a*d*e^2*n-54*x*ln(c*x^n)*b*d^2*e*n-27*x*b*d^2*e*n^2-54*x*a*d^2*e*n-12*ln(c*x^n)*b*d^3*n-4*b*d^3*n^2-12*a*d^3
*n)/n

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.20 \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\frac {18 \, b e^{3} n x^{3} \log \left (x\right )^{2} - 4 \, b d^{3} n - 12 \, a d^{3} - 108 \, {\left (b d e^{2} n + a d e^{2}\right )} x^{2} - 27 \, {\left (b d^{2} e n + 2 \, a d^{2} e\right )} x - 6 \, {\left (18 \, b d e^{2} x^{2} + 9 \, b d^{2} e x + 2 \, b d^{3}\right )} \log \left (c\right ) + 6 \, {\left (6 \, b e^{3} x^{3} \log \left (c\right ) - 18 \, b d e^{2} n x^{2} + 6 \, a e^{3} x^{3} - 9 \, b d^{2} e n x - 2 \, b d^{3} n\right )} \log \left (x\right )}{36 \, x^{3}} \]

[In]

integrate((e*x+d)^3*(a+b*log(c*x^n))/x^4,x, algorithm="fricas")

[Out]

1/36*(18*b*e^3*n*x^3*log(x)^2 - 4*b*d^3*n - 12*a*d^3 - 108*(b*d*e^2*n + a*d*e^2)*x^2 - 27*(b*d^2*e*n + 2*a*d^2
*e)*x - 6*(18*b*d*e^2*x^2 + 9*b*d^2*e*x + 2*b*d^3)*log(c) + 6*(6*b*e^3*x^3*log(c) - 18*b*d*e^2*n*x^2 + 6*a*e^3
*x^3 - 9*b*d^2*e*n*x - 2*b*d^3*n)*log(x))/x^3

Sympy [A] (verification not implemented)

Time = 2.46 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.14 \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=- \frac {a d^{3}}{3 x^{3}} - \frac {3 a d^{2} e}{2 x^{2}} - \frac {3 a d e^{2}}{x} + a e^{3} \log {\left (x \right )} + b d^{3} \left (- \frac {n}{9 x^{3}} - \frac {\log {\left (c x^{n} \right )}}{3 x^{3}}\right ) + 3 b d^{2} e \left (- \frac {n}{4 x^{2}} - \frac {\log {\left (c x^{n} \right )}}{2 x^{2}}\right ) + 3 b d e^{2} \left (- \frac {n}{x} - \frac {\log {\left (c x^{n} \right )}}{x}\right ) - b e^{3} \left (\begin {cases} - \log {\left (c \right )} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate((e*x+d)**3*(a+b*ln(c*x**n))/x**4,x)

[Out]

-a*d**3/(3*x**3) - 3*a*d**2*e/(2*x**2) - 3*a*d*e**2/x + a*e**3*log(x) + b*d**3*(-n/(9*x**3) - log(c*x**n)/(3*x
**3)) + 3*b*d**2*e*(-n/(4*x**2) - log(c*x**n)/(2*x**2)) + 3*b*d*e**2*(-n/x - log(c*x**n)/x) - b*e**3*Piecewise
((-log(c)*log(x), Eq(n, 0)), (-log(c*x**n)**2/(2*n), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.06 \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\frac {b e^{3} \log \left (c x^{n}\right )^{2}}{2 \, n} + a e^{3} \log \left (x\right ) - \frac {3 \, b d e^{2} n}{x} - \frac {3 \, b d e^{2} \log \left (c x^{n}\right )}{x} - \frac {3 \, b d^{2} e n}{4 \, x^{2}} - \frac {3 \, a d e^{2}}{x} - \frac {3 \, b d^{2} e \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac {b d^{3} n}{9 \, x^{3}} - \frac {3 \, a d^{2} e}{2 \, x^{2}} - \frac {b d^{3} \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {a d^{3}}{3 \, x^{3}} \]

[In]

integrate((e*x+d)^3*(a+b*log(c*x^n))/x^4,x, algorithm="maxima")

[Out]

1/2*b*e^3*log(c*x^n)^2/n + a*e^3*log(x) - 3*b*d*e^2*n/x - 3*b*d*e^2*log(c*x^n)/x - 3/4*b*d^2*e*n/x^2 - 3*a*d*e
^2/x - 3/2*b*d^2*e*log(c*x^n)/x^2 - 1/9*b*d^3*n/x^3 - 3/2*a*d^2*e/x^2 - 1/3*b*d^3*log(c*x^n)/x^3 - 1/3*a*d^3/x
^3

Giac [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.18 \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\frac {1}{2} \, b e^{3} n \log \left (x\right )^{2} - 3 \, b d e^{2} n {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} - \frac {3}{4} \, b d^{2} e n {\left (\frac {2 \, \log \left (x\right )}{x^{2}} + \frac {1}{x^{2}}\right )} - \frac {1}{9} \, b d^{3} n {\left (\frac {3 \, \log \left (x\right )}{x^{3}} + \frac {1}{x^{3}}\right )} + b e^{3} \log \left (c\right ) \log \left ({\left | x \right |}\right ) + a e^{3} \log \left ({\left | x \right |}\right ) - \frac {3 \, b d e^{2} \log \left (c\right )}{x} - \frac {3 \, a d e^{2}}{x} - \frac {3 \, b d^{2} e \log \left (c\right )}{2 \, x^{2}} - \frac {3 \, a d^{2} e}{2 \, x^{2}} - \frac {b d^{3} \log \left (c\right )}{3 \, x^{3}} - \frac {a d^{3}}{3 \, x^{3}} \]

[In]

integrate((e*x+d)^3*(a+b*log(c*x^n))/x^4,x, algorithm="giac")

[Out]

1/2*b*e^3*n*log(x)^2 - 3*b*d*e^2*n*(log(x)/x + 1/x) - 3/4*b*d^2*e*n*(2*log(x)/x^2 + 1/x^2) - 1/9*b*d^3*n*(3*lo
g(x)/x^3 + 1/x^3) + b*e^3*log(c)*log(abs(x)) + a*e^3*log(abs(x)) - 3*b*d*e^2*log(c)/x - 3*a*d*e^2/x - 3/2*b*d^
2*e*log(c)/x^2 - 3/2*a*d^2*e/x^2 - 1/3*b*d^3*log(c)/x^3 - 1/3*a*d^3/x^3

Mupad [B] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.08 \[ \int \frac {(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\ln \left (x\right )\,\left (a\,e^3+\frac {11\,b\,e^3\,n}{6}\right )-\frac {x\,\left (9\,a\,d^2\,e+\frac {9\,b\,d^2\,e\,n}{2}\right )+2\,a\,d^3+x^2\,\left (18\,a\,d\,e^2+18\,b\,d\,e^2\,n\right )+\frac {2\,b\,d^3\,n}{3}}{6\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d^3}{3}+\frac {3\,b\,d^2\,e\,x}{2}+3\,b\,d\,e^2\,x^2+\frac {11\,b\,e^3\,x^3}{6}\right )}{x^3}+\frac {b\,e^3\,{\ln \left (c\,x^n\right )}^2}{2\,n} \]

[In]

int(((a + b*log(c*x^n))*(d + e*x)^3)/x^4,x)

[Out]

log(x)*(a*e^3 + (11*b*e^3*n)/6) - (x*(9*a*d^2*e + (9*b*d^2*e*n)/2) + 2*a*d^3 + x^2*(18*a*d*e^2 + 18*b*d*e^2*n)
 + (2*b*d^3*n)/3)/(6*x^3) - (log(c*x^n)*((b*d^3)/3 + (11*b*e^3*x^3)/6 + (3*b*d^2*e*x)/2 + 3*b*d*e^2*x^2))/x^3
+ (b*e^3*log(c*x^n)^2)/(2*n)